#ifndef GTS_NO_WSTRING


#ifndef Foundation_UnicodeConverter_INCLUDED
#define Foundation_UnicodeConverter_INCLUDED


#include "wch/Foundation.h"


namespace wch {


class UnicodeConverter
	/// A convenience class that converts strings from
	/// UTF-8 encoded std::strings to UTF-16 encoded std::wstrings 
	/// and vice-versa.
	///
	/// This class is mainly used for working with the Unicode Windows APIs
	/// and probably won't be of much use anywhere else.
{
public:
	static void toUTF16(const std::string& utf8String, std::wstring& utf16String);
		/// Converts the given UTF-8 encoded string into an UTF-16 encoded wstring.

	static void toUTF16(const char* utf8String, int length, std::wstring& utf16String);	
		/// Converts the given UTF-8 encoded character sequence into an UTF-16 encoded string.

	static void toUTF16(const char* utf8String, std::wstring& utf16String);	
		/// Converts the given zero-terminated UTF-8 encoded character sequence into an UTF-16 encoded wstring.

	static void toUTF8(const std::wstring& utf16String, std::string& utf8String);
		/// Converts the given UTF-16 encoded wstring into an UTF-8 encoded string.

	static void toUTF8(const wchar_t* utf16String, int length, std::string& utf8String);
		/// Converts the given zero-terminated UTF-16 encoded wide character sequence into an UTF-8 encoded wstring.

	static void toUTF8(const wchar_t* utf16String, std::string& utf8String);
		/// Converts the given UTF-16 encoded zero terminated character sequence into an UTF-8 encoded string.
};


} // namespace wch


#endif // Foundation_UnicodeConverter_INCLUDED


#endif // GTS_NO_WSTRING
